﻿@model IEnumerable<Banking.Domain.Operation>

@{
    ViewBag.Title = "AllOperations";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<table class="tableView" id="operations">

  <caption>
    <p>Deals</p>
    <div class="actionsMenu">
    
        <button data-action="create" data-entity="operation" id="createOperationButton"><img src="../../Content/images/add.png" /> Create</button>
        <button data-action="delete" data-entity="operation" id="deleteOperationButton" disabled><img src="../../Content/images/delete.png"> Delete selected</button>
        <button data-action="import" id="importOperationButton"><img src="../../Content/images/import.png"> Import</button>

    </div>
  </caption>
  <thead>
    <tr id="headings">
        <th scope="col" class="checkCol">
            <input type="checkbox" id="selectAll" data-action="selectAll" data-entity="operation" data-view="view"/>
        </th>
        <th scope="col" data-action="sort" class="sortable" data-sort-key="mark">Mark</th>
        <th scope="col" data-action="sort" class="sortable" data-sort-key="amount">Money,$</th>
        <th scope="col" data-action="sort" class="sortable" data-sort-key="description">Description</th>
        <th scope="col" data-action="sort" class="sortable" data-sort-key="date">Start&nbsp;Date&nbsp;</th>
        <th scope="col" data-action="sort" class="sortable" data-sort-key="participants">Participants</th>
    </tr>
  </thead>
  <tbody data-list="operation" data-sort-key="date" data-sort-order="descending" data-view="view">
  @foreach (var op in Model)
  {
    @Html.Partial("ViewOperation", op)
  }
  </tbody>
</table>
